package com.example.tilitili.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.tilitili.pojo.User;
import com.example.tilitili.vo.LoginVo;
import com.example.tilitili.vo.RegisterVo;
import com.example.tilitili.vo.RespBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 *  服务类
 * </p>
 * @chenyu
 * @author chenyu
 * @since 2022-01-11
 */
public interface IUserService extends IService<User> {
    RespBean doLogin(LoginVo loginVo, HttpServletRequest request,HttpServletResponse response);
//    根据cookie获取用户
    User getByUserTicket(String userTicket,HttpServletRequest request,HttpServletResponse response);

    User register(RegisterVo registerVo);

    /**
     * 更新密码
      * @param userTicket
     * @param id
     * @param password
     * @return
     */
    RespBean updatePassword(String userTicket,Long id,String password);

    RespBean doregister(RegisterVo registerVo, HttpServletRequest request,HttpServletResponse response);
}
